home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group99a.txt / 000222_icon-group-sender _Tue Oct 26 16:31:01 1999.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id QAA15379
  4.     for icon-group-addresses; Tue, 26 Oct 1999 16:30:46 -0700 (MST)
  5. Message-Id: <199910262330.QAA15379@baskerville.CS.Arizona.EDU>
  6. X-Authentication-Warning: agate-ether.berkeley.edu: news set sender to <news> using -f
  7. From: "Sean R. McCorkle" <mccorkle@bnl.gov>
  8. X-Newsgroups: comp.lang.icon
  9. Subject: csets and sets of characters
  10. Date: Tue, 26 Oct 1999 16:20:41 -0400
  11. To: icon-group@optima.CS.Arizona.EDU
  12. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  13. Status: RO
  14.  
  15.  
  16. In writing an Icon version of a command line options parser,
  17. like getopt() in C & Perl, I decided to first convert the input
  18. string of option characters (ie. "abc:12:") into two sets of
  19. characters, one for options that take arguments, and one for
  20. options which take no arguments.  This is easy using Icon sets,
  21. but it seems more natural somehow to use the built-in cset
  22. datatype.  But I don't see how to test for members in csets
  23. (member( 'abc', "b" ) generates a run time error).  Any sage
  24. advice out there about when to use sets and/or csets?
  25.  
  26. Also, if anybody has any examples of command line options parsers,
  27. or if there's one I've overlooked the standard libs or literature,
  28. I'd sure be grateful if someone could point 'em out to me.  (I'm a
  29. real novice at Icon)
  30.  
  31. Thank you all,
  32.  
  33. --
  34. ------------------------------------------------------------------------------
  35. Sean R. McCorkle                          mccorkle@bnl.gov
  36. Biology Department, Genome Group          (516) 344-4270 phone
  37. Brookhaven National Laboratory            (516) 344-3407 fax
  38. Upton, New York  11973
  39.    "Oh plunge your hands in water,  Plunge them in up to the wrist,
  40.       Stare, stare in the basin,  And wonder what you've missed." - W.H. Auden
  41.  
  42.  
  43.  
  44.